<table  class='list_job' style="width: 100%;">
	<caption>Danh sách các hồ sơ đã tạo</caption>
	<thead>
		<tr>
			<th class="stt" style="width: 5%;">STT</th>
			<th>Tên hồ sơ</th>
			<th style="width: 20%; text-align: center">Trạng thái</th>
			<th style="width: 20%; text-align: center">Tuỳ chọn</th>
		</tr>
	</thead>
	<tbody>
		<?php  
			if(isset($info) && count($info)){
				$i = 1;
				foreach ($info as $key => $val) {
					echo "<tr>";
						echo "<td>".$i."</td>";
						echo "<td>".$val['ten_hs']."</td>";
						if($val['active'] == 0){
							echo "<td style='text-align: center;'><a href='".base_url()."student/active_record/".$val['id']."' title='Đăng tải hồ sơ'><img src='".base_url()."public/img/cross.png'></a></td>";
						}elseif ($val['active'] == 1) {
							echo "<td style='text-align: center;'><a href='".base_url()."student/deactive_record/".$val['id']."' title='Huỷ bỏ việc đăng tải hồ sơ'><img src='".base_url()."public/img/tick.png'></a></td>";
						}
						echo "<td style='text-align: center;'>";
							echo "<a href='".base_url()."student/record_detail/".$val['id']."' title='Xem chi tiết'><img src='".base_url()."public/img/view.png'></a>";
							echo "<a style='padding-left: 20px;' href='#' title='Xoá hồ sơ này' onclick='delete_record(".$val['id'].")'><img src='".base_url()."public/img/delete.png'></a>";
							echo "<a style='padding-left: 20px;' href='".base_url()."student/show_edit_record/".$val['id']."' title='Sửa hồ sơ'><img src='".base_url()."public/img/edit.png'></a>";
						echo "</td>";
					echo "</tr>";
					$i++;
				}
			}
		?>
	</tbody>
</table>	

<script type="text/javascript">
	function delete_record(id) {
		if(confirm("Are you sure?") == true){
			window.location.href = "<?php echo base_url() ?>student/delete_record/"+id;
		}
	}
</script>